<div class="work-board-top clearfix" ng-if="activeFlag[0]">
    <img class="avatar pull-left" src="assets/img/avatar.png">
    <div class="pull-left m-l-sm">
        <div class="welcome">{{curUser.name}} <span translate>欢迎您，祝您开心每一天！</span></div>
        <div class="depart" > <span translate>{{curUser.roleNames}}</span>  | <span translate>{{curUser.deptName}}</span></div>
    </div>
    <div class="pull-right">
        <a target="_blank" href="assets/img/download-app-prod.png" ng-if="isEnvProd">
            <img style="width: 60px;" src="assets/img/download-pda-prod.png" title="点击扫码下载PDA">
        </a>
        <a target="_blank" href="assets/img/download-pda-test.png" ng-if="!isEnvProd">
            <img style="width: 60px;" src="assets/img/download-pda-test.png" title="点击扫码下载PDA">
        </a>
    </div>
</div>

<div class="work-board work-main" ng-if="activeFlag[0]">
    <div class="title-bar clearfix" translate>待办事项</div>
    <div class="con-wrap to-do clearfix">
        <div class="to-do-item" ng-click="getSubNav('app.sales.guaranteesApply')"
            ng-if="btnPermission.guaranteesApply">
            <div class="count">
                {{backlogData.threeGuaranteesCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-promise"></i>
            </div>
            <div class="font-14 m-t-xs" translate>三包申请审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.sales.purchaseApply')"
            ng-if="btnPermission.purchaseApply">
            <div class="count">
                {{backlogData.purchaseCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-shop-cart"></i>
            </div>
            <div class="font-14 m-t-xs" translate>采购申请审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.sales.returnApply')"
            ng-if="btnPermission.returnApply">
            <div class="count">
                {{backlogData.saleReturnCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-exchange"></i>
            </div>
            <div class="font-14 m-t-xs" translate>退货申请审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.sales.client')"
            ng-if="btnPermission.checkAgentApply">
            <div class="count">
                {{backlogData.dealerCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-agent"></i>
            </div>
            <div class="font-14 m-t-xs" translate>代理申请审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.report.missNote')"
            ng-if="btnPermission.missNote">
            <div class="count">
                {{backlogData.lackInboundCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>缺件到货提示</div>
        </div>

        <div class="to-do-item" ng-click="getSubNav('app.stock.splitArrival')"
            ng-if="btnPermission.splitArrival">
            <div class="count">
                {{backlogData.splitArrivalCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>拆件到货提示</div>
        </div>

        <div class="to-do-item" ng-click="getSubNav('app.report.libraryAge')"
            ng-if="btnPermission.libraryAge">
            <div class="count">
                {{backlogData.stockAlarmListCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-warn"></i>
            </div>
            <div class="font-14 m-t-xs" translate>库龄预警</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.sales.deliveryNotice')"
            ng-if="btnPermission.deliveryNote">
            <div class="count">
                {{backlogData.deliveryNoteCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>发货通知单审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.stock.pickingBill')"
            ng-if="btnPermission.pickingBill">
            <div class="count">
                {{backlogData.pickingBillCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>领料单审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.stock.unusualOut')"
            ng-if="btnPermission.unusualOut">
            <div class="count">
                {{backlogData.unusualOutCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>其他出库单审核</div>
        </div>
        <div class="to-do-item" ng-click="getSubNav('app.stock.unusualIn')"
            ng-if="btnPermission.unusualIn">
            <div class="count">
                {{backlogData.unusualInCount}}
            </div>
            <div class="icon">
                <i class="yb-icon ico-tips-success"></i>
            </div>
            <div class="font-14 m-t-xs" translate>其他入库单审核</div>
        </div>

    </div>

    <div class="title-bar m-t-sm clearfix" translate>数据动态</div>
    <div class="con-wrap">
        <div yb-bar-chart class="chart-wrap" chart-axis="specialScore" style="height:400px;"></div>
    </div>

    <div class="con-wrap brother" ng-if="isTJ">
        <div yb-bar-chart class="chart-wrap" chart-axis="stockAmount" style="height:400px;"></div>
    </div>
    <div class="con-wrap brother" ng-if="isTJ">
        <div yb-bar-chart class="chart-wrap" chart-axis="stockMoney" style="height:400px;"></div>
    </div>

    <div class="con-wrap brother" ng-if="isSCH">
        <div yb-bar-chart class="chart-wrap" chart-axis="purchaseArrivalRate" style="height:400px;"></div>
    </div>

    <div class="con-wrap brother" ng-if="false">
        <div yb-bar-chart class="chart-wrap" chart-axis="libraryAge" bar-type="pie" style="height:400px;"></div>
    </div>
</div>

<div class="work-board work-side" ng-if="activeFlag[0]">
    <div class="title-bar clearfix" translate>快捷导航</div>
    <div class="con-wrap clearfix short-cut">
        <div class="short-cut-item" ng-click="getSubNav('app.sales.client')"
            ng-if="btnPermission.checkAgentApply">
            <i class="yb-icon ico-sale"></i>
            <div class="font-14 m-t-xs" translate>客户管理</div>
        </div>
        <div class="short-cut-item" ng-click="getSubNav('app.sales.purchaseApply')"
            ng-if="btnPermission.purchaseApply">
            <i class="yb-icon ico-sale"></i>
            <div class="font-14 m-t-xs" translate>采购申请</div>
        </div>
        <div class="short-cut-item" ng-click="getSubNav('app.sales.sellIntention')"
            ng-if="btnPermission.sellIntention">
            <i class="yb-icon ico-sale"></i>
            <div class="font-14 m-t-xs" translate>销售意向</div>
        </div>
    </div>

    <div ng-if="!!showNotify" class="title-bar m-t-sm clearfix">
        <span translate>通知公告</span>
        <span class="more pull-right cursor-pointer btn-operate" ng-click="checkMore()">more&gt;&gt;</span>
    </div>
    <div ng-if="!!showNotify" class="con-wrap">
        <ul>
            <li ng-repeat="item in noticeList track by $index" class="cursor-pointer clearfix"
                ng-click="goDetail(item.id)">
                <div class="spill-dots pull-left" style="width: 225px;"><i class="glyphicon glyphicon-play"></i> <span
                        class="font-14">{{item.title}}</span></div>
                <div class="pull-right">
                    <span class="danger-color" ng-if="item.isHeader===1">【<span translate>置顶</span>】</span>
                    {{item.validateStart|YbDate}}
                </div>
            </li>
        </ul>
    </div>
</div>

<div class="row m-n" ng-if="activeFlag[1]||activeFlag[2]">

    <div tabset type="tab">
        <div tab heading="首页" active="activeFlag[0]"></div>

        <div tab heading="系统公告" active="activeFlag[1]" ng-click="checkMore()" ng-if="activeFlag[1]||activeFlag[2]">
            <div class="main-area d-t-35 d-b-60">
                <div class="col-xs-12 wrapper-xl notice-all">
                    <div class="col-xs-12 wrapper-none border-top">
                        <div class="col-xs-12 wrapper-md containter-border" ng-click="goDetail(item.id)"
                            ng-repeat="item in moreNoticList track by $index">
                            <a class="pull-left">
                                <i class="glyphicon glyphicon-pushpin m-r-md"></i>
                                {{item.title}}
                                <span class="danger-color" ng-if="item.isHeader===1">【<span translate>置顶</span>】</span>
                            </a>
                            <span class="pull-right">{{item.validateStart|YbDate:'yyyy-MM-dd'}}</span>
                        </div>
                    </div>
                </div>
                <div class="m-r-xxl" yb-page-info ng-model="pageInfo" yb-refresh="commentListSearch()"></div>
            </div>
        </div>

        <div tab heading="详情" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="main-area d-t-35 d-b-60">
                <div class="row wrapper">
                    <div class="notice-detail">
                        <div class="title text-center">
                            <span class="font-16">
                                {{noticeInfoObj.title}}
                                <span class="danger-color font-12" ng-if="noticeInfoObj.isHeader===1" translate>置顶</span>
                            </span>
                            <br>
                            <span translate>发布人</span>：{{noticeInfoObj.createName}}&emsp;&emsp; <span translate>发布时间</span>：{{noticeInfoObj.validateStart|YbDate}}&emsp;&emsp; <span translate>公告类型</span>：{{noticeInfoObj.typeName}}&emsp;&emsp;
                            <a ng-if="!!noticeInfoObj.click" class="btn-operate" ng-href="http://{{noticeInfoObj.click}}" target="_blank"> <span translate>相关链接</span></a>
                        </div>
                        <div class="con">
                            <div class="notice-content" ng-bind-html="noticeInfoObj.body|ybTrustHtml"></div>
                            <div class="row">
                                <div class="col-xs-1 text-right"> <span translate>附件</span>：</div>
                                <div class="col-xs-5 btn-operate cursor-pointer"
                                    ng-repeat="item in noticeInfoObj.basicAttachmentList"
                                    ng-click="downloadAttach(item)">{{item.name}}</div>
                                <div class="col-xs-5" ng-if="noticeInfoObj.basicAttachmentList.length===0">无</div>
                            </div>
                        </div>

                        <hr>
                        <div class="img-text-con m-t-100">
                            <ul>
                                <li class="nav-sub-tab">
                                    <p><button class="btn btn-success" ng-click="showComponentBtnFn()" translate>发表评论</button></p>
                                    <p ng-if="showComponentBtn"><textarea class="form-control"
                                            ng-model="commentObj.content" style="resize:none;width: 400px"
                                            maxlength="200"></textarea></p>
                                    <p ng-if="showComponentBtn"><button class="btn btn-default"
                                            ng-click="submitComment(noticeInfoObj.id)" translate>提交</button></p>
                                </li>
                                <li class="item" ng-repeat="item in commentList">
                                    <div class="pull-left">{{item.createName}}</div>
                                    <div class="date pull-right">
                                        <em>{{item.createDate|YbDate}}</em>
                                    </div>
                                    <div class="text clearfix">
                                        <div class="paragraph" title="{{item.content}}">
                                            {{item.content}}
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="m-r-xxl" ng-if="commentList.length>0" yb-page-info ng-model="commentPageInfo"
                            yb-refresh="commentSearch()"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
